//
//  CommonUtils.h
//  帮惠Mall
//
//  Created by reew on 2017/9/15.
//  Copyright © 2017年 reew. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <AFNetworking.h>
typedef NS_ENUM(NSInteger,HUDStatus){
    NomormalStatus = 0,
    SuccessStatus,
    ErrorStatus,
    LoadingStatus
};
@interface CommonUtils : NSObject
//手机号判断
+ (BOOL)isPhoneNum:(NSString *)num;
+  (AFHTTPSessionManager *)getAFHTTPSessionManager;
+ (void)showAlertViewWithTitle:(NSString *)title Message:(NSString *)message vc:(UIViewController *)vc;
+(void)saveLoginfoWith:(BOOL)isMember;
+(void)saveSymbolNoWith:(NSString *)info;

/**
 生成一个UINavigationController

 @param name storyboard名字
 @param identifier UINavigationController的名字
 @return UINavigationController
 */
+(UINavigationController *)creatNaVcWithStoryboardName:(NSString *)name NaVcIdentifier:(NSString *)identifier;

+ (UITabBarController *)getHomeVC;
+ (UINavigationController *)getLoginVC;
+ (UIViewController *)getVCWithSBName:(NSString *)name VCIdetifiy:(NSString *)identifier;
+ (void)sendPOST:(NSString *)URLString
parameters:(id)parameters
constructingBodyWithBlock:(void (^)(id <AFMultipartFormData> formData))block
progress:(nullable void (^)(NSProgress * _Nonnull))uploadProgress
success:(void (^)(NSURLSessionDataTask *task, id responseObject))success
         failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure;

+ (void)showHudWithStatus:(HUDStatus)status stayTime:(float)time info:(NSString *)info;
+ (void)dismisHud;

+ (CGFloat)getStringWidthWithFontSize:(CGFloat)font string:(NSString *)str andHeight:(CGFloat)height;
@end
